#include <napi.h>
#include "Calculation.h"


Napi::Object Calculate(const Napi::CallbackInfo& info) {
  Napi::Env env = info.Env();
  Napi::String arg0 = info[0].As<Napi::String>();
  // std::cout << arg0.Utf8Value() << std::endl;


  Napi::Object action = Napi::Object::New(env);
  action.Set(Napi::String::New(env, "moveType"), "TOP");
  action.Set(Napi::String::New(env, "shoot"), false);
  return action;
}

Napi::Object Init(Napi::Env env, Napi::Object exports) {
  exports.Set(Napi::String::New(env, "calculate"), Napi::Function::New(env, Calculate));
  return exports;
}

NODE_API_MODULE(addon, Init)